Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 15, 2026

Summary

  • Adds semver fields to all changelog categories in .github/release.yml
  • Fixes the "None" semver impact shown in changelog preview comments (e.g., #1191)

Background

Craft uses the semver field in .github/release.yml categories to determine the suggested version bump for PRs. Without these fields, PRs are correctly categorized in the changelog but don't contribute to version bump detection.

This was discovered when investigating why PR #1191 (a feat: commit) showed "None" for semver impact in the changelog preview comment.

Changes

Added semver mappings following conventional commit semantics:

Category Semver
Important Changes minor
Breaking Changes major
Features minor
Bug Fixes patch
Documentation patch
Internal Changes patch

This enables Craft's automatic version bump detection for changelog preview
comments on PRs. Without these fields, the changelog preview shows 'None'
for the semver impact even when PRs match categories like Features or Bug Fixes.

The semver mappings follow conventional commit semantics:
- Important Changes: minor
- Breaking Changes: major
- Features: minor
- Bug Fixes: patch
- Documentation: patch
- Internal Changes: patch
@github-actions
Copy link

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Features

  • (cloudflare) Add enableLogs when setting up Cloudflare by JPeer264 in #1191

Bug Fixes

  • (apple) Prevent duplicate init() in SwiftUI apps with existing initializer by betegon in #1188
  • (release) Add semver fields to changelog categories by BYK in #1193

Internal Changes

  • (release) Switch from action-prepare-release to Craft by BYK in #1186

🤖 This preview updates automatically when you update the PR.

Copy link
Member

@JPeer264 JPeer264 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. It works for this PR, let's see if it does for others too

@BYK
Copy link
Member Author

BYK commented Jan 15, 2026

@JPeer264 once this is merged, you can edit the PR description, title, add-remove labels etc to trigger a re-run of the action to update the preview. This should work even when the PR is closed/merged.

@BYK BYK merged commit ed9ce01 into master Jan 15, 2026
54 checks passed
@BYK BYK deleted the fix/add-semver-to-release-config branch January 15, 2026 14:57
BYK added a commit to getsentry/craft that referenced this pull request Jan 15, 2026
## Summary

- Adds a warning when custom `.github/release.yml` has categories
without `semver` fields
- Updates documentation to clarify that `semver` is required for version
bump detection
- Adds tests for the warning behavior

## Background

When investigating
[getsentry/sentry-wizard#1191](getsentry/sentry-wizard#1191),
the changelog preview showed "None" for semver impact despite the PR
having a `feat:` prefix. The root cause was that sentry-wizard's custom
`.github/release.yml` defined categories with `labels` and
`commit_patterns` but no `semver` fields.

Without `semver` fields, PRs are correctly categorized in the changelog
but don't contribute to version bump detection.

## Changes

### Warning
When Craft normalizes a custom release config, it now warns about
categories missing `semver`:

```
The following changelog categories have no 'semver' field and won't contribute to 
version bump detection: "Features", "Bug Fixes". 
See: https://getsentry.github.io/craft/configuration/#auto-mode
```

The warning:
- Only fires for custom configs (not default config)
- Only fires once per Craft invocation (deduplicated)
- Includes link to documentation

### Documentation
- Added caution admonition in `configuration.md` explaining `semver`
requirement
- Added note in `github-actions.md` about version bump detection
requirements

## Related

- Fix for sentry-wizard:
getsentry/sentry-wizard#1193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants